<template>
  <div class="faqs">
    <div class="appPc" v-if="$store.state.screenWidth > 1300">
      <div class="backdrop">
        <img
          src="https://ir3.anbio.xyz/uploads/image/6528681748657426.jpg"
          alt=""
        />
        <h1 class="title">FAQs</h1>
      </div>
      <div class="title">Investor FAQs</div>
      <div class="content interval">
        <el-collapse :model="activeNames" @change="handleChange">
          <el-collapse-item
            v-for="(item, index) in faqsList"
            :key="index"
            class="faqs-list"
            :name="index"
          >
            <template slot="title">
              <div class="faqs-title">{{ item.title }}</div>
            </template>
            <div class="faqs-text">
              {{ item.text }}
              <span v-if="item.index == 2 || item.index == 1"
                ><br />{{ item.text1 }}</span
              >
              <span v-if="item.index == 2 || item.index == 1"
                ><br />{{ item.text2 }}</span
              >
            </div>
          </el-collapse-item>
        </el-collapse>
      </div>
    </div>

    <div class="appH5" v-else>
      <div class="popup-lint"></div>

      <div class="backdrop">
        <img
          src="https://ir3.anbio.xyz/uploads/image/6528681748657426.jpg"
          alt=""
        />
        <h1 class="title">FAQs</h1>
      </div>

      <div class="header">Investor FAQs</div>

      <div class="content">
        <el-collapse :model="activeNames" @change="handleChange">
          <el-collapse-item
            v-for="(item, index) in faqsList"
            :key="index"
            class="faqs-list"
            :name="index"
          >
            <template slot="title">
              <div class="faqs-title">{{ item.title }}</div>
            </template>
            <div class="faqs-text">
              {{ item.text }}
              <span v-if="item.index == 2 || item.index == 1"
                ><br />{{ item.text1 }}</span
              >
              <span v-if="item.index == 2 || item.index == 1"
                ><br />{{ item.text2 }}</span
              >
            </div>
          </el-collapse-item>
        </el-collapse>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      faqsList: [
        {
          title: `When was the Company incorporated?`,
          text: `Park Ha Biological Technology Co., Ltd. was incorporated on October 11, 2022.`,
          index: 0,
        },
        {
          title: `When is the Company's fiscal year end?`,
          text: `October 31`,
          index: 0,
        },
        {
          title: `Who is the Company's independent auditor?`,
          text: `WWC, P.C.`,
          text1: `2010 Pioneer Court, San Mateo, CA 94403`,
          text2: `Tel: +1-650-638-0808`,
          index: 1,
        },
        {
          title: `Who is the Company’s U.S. legal counsel?`,
          text: `Ortoli Rosenstadt LLP`,
          text1: `366 Madison Avenue, 3rd Floor New York, NY 10017`,
          text2: `Tel: +1-212-588-0022`,
          index: 1,
        },
        {
          title: `Who is the Company’s transfer agent?`,
          text: `Transhare Corporation`,
          text1: `Bayside Center 1, 17755 North US Highway 19, Suite No. 140, Clearwater, FL 33764`,
          index: 2,
        },
      ],
      activeNames: ["1"],
    };
  },
  created() {
    this.scrollTotap();
  },
  methods: {
    handleChange(val) {},
    scrollTotap() {
      window.scrollTo(0, 0);
    },
  },
};
</script>

<style lang="less" scoped>
.faqs {
  .appPc {
    .backdrop {
      height: 205px;
      width: 100%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
      }

      .title {
        letter-spacing: 1.5px;
        color: #fff;
        position: relative;
        font-size: 48px;
        font-weight: bold;
      }
    }

    .title {
      padding-top: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 50px;
      font-weight: 500;
    }

    .content {
      padding: 50px;
      box-sizing: border-box;

      /deep/ .el-collapse {
        border-top: 0;
        border-bottom: 0;
      }

      /deep/ .el-collapse-item {
        // border: 1px solid #efefef;
        border-radius: 10px;
      }

      /deep/ .el-collapse-item__header {
        height: auto;
        line-height: unset;
        width: 100%;
        background: #e7f1ff;
        border-radius: 10px;
        position: relative;
        overflow: hidden;
        transition: 0.3s ease;
      }

      /deep/ .is-active {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
      }

      /deep/ .el-collapse-item__content {
        padding-bottom: 0;
      }

      /deep/ .el-collapse-item__wrap {
        border-bottom: 0;
      }

      /deep/ .el-collapse-item__header {
        font-size: 20px;
      }

      .faqs-list {
        // border-bottom-left-radius: 0;
        margin-bottom: 20px;

        // border-bottom-right-radius: 0;
        .faqs-title {
          background: #e7f1ff;
          padding: 15px 30px;
          font-weight: 600;
          cursor: pointer;
          color: #276cd3;
          font-size: 24px;
          width: 100%;
        }

        .faqs-text {
          padding: 15px 30px;
          font-size: 20px;
          border: 1px solid #efefef;
          border-radius: 10px;
          // background: red;
          border-top-left-radius: 0;
          border-top-right-radius: 0;
          line-height: 50px;
        }
      }

      .faqs-list:last-child {
        margin-bottom: 0;
      }
    }
  }

  .appH5 {
    background: #fff;
    padding-bottom: 50px;

    .backdrop {
      height: 200px;
      width: 100%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
      }

      .title {
        letter-spacing: 1.5px;
        color: #fff;
        position: relative;
        font-size: 24px;
        font-weight: bold;
      }
    }

    .header {
      padding: 40px 0;
      box-sizing: border-box;
      text-align: center;
      font-size: 30px;
      font-weight: 500;
    }

    .content {
      padding: 0 10px;
      box-sizing: border-box;

      /deep/ .is-active {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
      }

      /deep/ .el-collapse-item__content {
        padding-bottom: 0;
      }

      /deep/ .el-collapse-item__wrap {
        border-bottom: 0;
      }

      /deep/ .el-collapse-item__header {
        font-size: 18px;
        background: #e7f1ff;
      }

      .faqs-list {
        margin-bottom: 20px;

        .faqs-title {
          background: #e7f1ff;
          cursor: pointer;
          color: #276cd3;
          font-size: 14px;
          font-weight: 500;
          width: 100%;
          padding-left: 10px;
        }

        .faqs-text {
          font-size: 14px;
          font-weight: 500;
          border: 1px solid #efefef;
          border-top-left-radius: 0;
          border-top-right-radius: 0;
          padding: 10px;
          box-sizing: border-box;
        }
      }

      .faqs-list:last-child {
        margin-bottom: 0;
      }
    }
  }
}
</style>